package com.guchenbo.study.aop;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/")
public class IndexController {

    @Resource
    private UserService userService;
    @Resource
    private Gcb gcb;

    @GetMapping("/")
    public String ok() {
        userService.user();
        return "ok";
    }
    @GetMapping("/error")
    public String error() {
        userService.error();
        return "error";
    }
}
